import { ICondition } from '../../../interfaces';
import service from './service';

export default async function drools(spaceid: string, systemid: string, refsystemid: string, service_name: string, condition: ICondition) {
	const param = {
		condition: condition || {
			paging: {
				index: 1,
				size: 12
			},
			param: {},
			sort: {}
		},
		modelid: 'custom::drools_' + service_name,
		refsystemid,
		spaceid,
		systemid
	};
	return await service(spaceid, 'dataservice.drools', param);
}
